import 'package:flutter/material.dart';
import 'package:flutter_inappbrowser/flutter_inappbrowser.dart';
import 'package:jd_shopping/services/ScreenAdaper.dart';

class ProductDetaileTabBarView extends StatefulWidget {
  @override
  _ProductDetaileTabBarViewState createState() => _ProductDetaileTabBarViewState();
}

class _ProductDetaileTabBarViewState extends State<ProductDetaileTabBarView> with AutomaticKeepAliveClientMixin {

  @override
  bool get wantKeepAlive => true;

   InAppWebViewController webView;
  @override
  void initState() {
    // TODO: implement initStaten
    super.initState();
  }
  @override
  Widget build(BuildContext context) {
     ScreenAdaper.init(context);
    return Container(
       padding: EdgeInsets.only(bottom:ScreenAdaper.height(134)),
       child:Column(
        children: <Widget>[
           Expanded(
              child: InAppWebView(
                     initialUrl:'http://jd.itying.com/pcontent?id=5a0425bc010e711234661439',
                     initialOptions: InAppWebViewWidgetOptions(
                      inAppWebViewOptions: InAppWebViewOptions(
                        debuggingEnabled: true
                      )
                    ),                    
                    onProgressChanged: (InAppWebViewController controller, int progress) {
                       print(progress/100);
                    },
            ),
           )
        ],
      ),
    );
  }
}